using UnityEngine;

public class SlimeAttackState : EnemyState
{
    private new Slime Enemy => (Slime)base.Enemy;

    public SlimeAttackState(Enemy enemy, string animName) : base(enemy, animName) { }

    public override void Update()
    {
        base.Update();
        Enemy.SetVelocityToZero();
        if (TriggerCalled)
        {
            StateMachine.ChangeTo(Enemy.BattleState);
        }
    }

    public override void Exit()
    {
        base.Exit();
        Enemy.lastTimeAttacked = Time.time;
    }
}
